using System;
using System.Collections.Generic;

namespace MvcCms.Data
{
    public interface IEntityAccountRepository
    {
        //User Methods
        IEnumerable<DTOContributor> ListContributors(Portal portal);
        User GetUser(Guid userId);
        User GetUser(string userName);
        User GetUserByOpenId(string openId, int portalId);
        //These do not use the shared datacontext of the rest of the app
        //and are used by the membership service
        User GetUser_MPCtxt(Guid userId);
        User GetUser_MPCtxt(string userName);

        User GetUserByEmail(string email);
        User EditUserEntity(User userToEdit);
        User EditUser(User userToEdit);
        void DeleteUser(string userName);
        IEnumerable<User> ListUsers(int pageIndex, int pageSize, Portal portal);
        IEnumerable<User> ListUsers(Portal portal);
        IEnumerable<User> ListUsersWithProfile(Portal portal);
        int GetNumberOfUsersOnline(int timewindow, Portal portal);
        IEnumerable<User> SearchUsers(string columnName, string searchTerm, Portal portal);
        User CreateUser(User userToCreate);

        //Profile Methods
        Profile GetProfile(Guid userKey);
        Profile GetProfile(int profileId);
        Profile SetProfileData(Profile profileToEdit);
        //Role Methods
        IEnumerable<User> ListUsersNotInRole(string roleName, int portalId);
        IEnumerable<DTOUserRole> ListUsersInRole(string roleName, int portalId);
        Role GetRole(string loweredRoleName);
        Role GetRole(Guid roleId);
    }
}